#!/bin/bash

# 参考：https://blog.csdn.net/qq_42016966/article/details/110082680?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-110082680-blog-135576671.235^v43^pc_blog_bottom_relevance_base9&spm=1001.2101.3001.4242.3&utm_relevant_index=7



exec_path=$(dirname "$0")

cd ${exec_path}

mkdir -p bin conf script

wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/0.18.0/jmx_prometheus_httpserver-0.18.0.jar

if [ -f jmx_prometheus_httpserver-0.18.0.jar ];then
    \cp jmx_prometheus_httpserver-0.18.0.jar ./bin
fi

# 下载zookeeper.yaml

## git clone https://github.com/prometheus/jmx_exporter.git

## \cp jmx_exporter/examples/zookeeper.yaml ./conf

# zookeeper server 启动修改

## zkServer.sh中增加JMXPORT=8087，在JMXPORT判断之前，44行前。重启zookeeper server

## 确认zookeeper监听8087端口


